package Person.WangLuoBianCheng;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class InterAddressDemo {
    public static void main(String[] args) throws UnknownHostException {
//      InetAddress address = InetAddress.getByName("107-java0002");
        InetAddress address = InetAddress.getByName("172.19.29.103");

      String ip = address.getHostAddress();
      String name = address.getHostName();

        System.out.println(name);
        System.out.println(ip);
    }
}
